package com.chapp.base;

import java.io.Serializable;

public class Location implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String city;
	private String country;
	private String street;
	private String postalCode;
	private String geoLat;
	private String geoLong;

	// <location>
	// <city>Exeter</city>
	// <country>United Kingdom</country>
	// <street/>
	// <postalcode/>
	// <geo:point>
	// <geo:lat>50.7</geo:lat>
	// <geo:long>-3.5333333</geo:long>
	// </geo:point>
	// </location>

	public Location(Location location) {
		this.city = location.city;
		this.country = location.country;
		this.street = location.street;
		this.postalCode = location.postalCode;
		this.geoLat = location.geoLat;
		this.geoLong = location.geoLong;
	}

	@Override
	public String toString() {
		return "LOCATION: " + city + country + street + geoLat + geoLong;
	}

	public Location() {
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getStreet() {
		return street;
	}

	public void setStreet(String street) {
		this.street = street;
	}

	public String getPostalCode() {
		return postalCode;
	}

	public void setPostalCode(String postalCode) {
		this.postalCode = postalCode;
	}

	public String getGeoLat() {
		return geoLat;
	}

	public void setGeoLat(String geoLat) {
		this.geoLat = geoLat;
	}

	public String getGeoLong() {
		return geoLong;
	}

	public void setGeoLong(String geoLong) {
		this.geoLong = geoLong;
	}

	public Location copy() {
		return new Location(this);
	}

	public void clean() {
		this.city = null;
		this.country = null;
		this.street = null;
		this.postalCode = null;
		this.geoLat = null;
		this.geoLong = null;
	}
}
